<?
	include_once('include.php');
	if(isset($_REQUEST['Update']) && $_REQUEST['Update']=='true'){
		echo("Update");
		UpdateItem($_REQUEST);
	}
	elseif(isset($_REQUEST['Add']) && $_REQUEST['Add']=='true'){
		echo("Add");
		AddItem($_REQUEST);
	}
	elseif(isset($_REQUEST['Delete']) && $_REQUEST['Delete']=='true'){
		DeleteItem($_REQUEST);
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Admin Update Center</title>
        <style type="text/css">
			<? include('../PageDetails/pagecss.css'); ?>
		</style>
    </head>
    
    <body background="Images/saturnvalley.jpg">
    	<div style="background-color:#CCC">
        	<div style="margin-top:200px">
            	<div>
                	<p>Please Enter All Fields Per Section</p>
                </div>
            	<div class="heading" style="border:groove; border-color:#0196E7">
                 	Update Item
                </div>
                <div>
                	<form method="post" id="1">
                        <input type="hidden" name="Update" value="true" />
                        <input type="hidden" name="ItemSet" value="false" />
                    	<div>
                        	<div style="margin-right:px">
                            	<label>Item Id: </label>
                            	<input name="ItemId" value="" />
                            </div>
                            <div style="margin-right:18px">
                            	<label>Item Desc: </label>
                                <input name="ItemName" value="" />
                            </div>
                        	<div style="margin-left:13px">
                            	<label>Price: </label>
                            	<input name="Price" value="" />
                            </div>
                            <div style="margin-right:22px">
                            	<label>Total Units: </label>
                                <input name="UnitTotal" value="" />
                            </div>
                        </div>
                        <input type="submit" value="Update Item" />
                    </form>
                </div>
            </div>
            <div>
            	<div class="heading" style="border:groove; border-color:#8AFF75">
            		Add Item
                </div>
                <div>
                	<form method="post" id="2">
                        <input type="hidden" name="Add" value="true" />
                    	<div>
                        	<div>
                            	<label>Item Id: </label>
                                <input name="ItemId" value="" />
                            </div>
                        	<div style="margin-right:24px">
                            	<label>Item Name: </label>
                            	<input name="ItemName" value="" />
                            </div>
                        	<div style="margin-left:13px">
                            	<label>Price: </label>
                            	<input name="Price" value="" />
                            </div>
                            <div style="margin-right:7px">
                            	<label>Quantity: </label>
                                <input name="Quantity" value="" />
                            </div>
                        </div>
                        <input type="submit" value="Add Item" />
                    </form>
                </div>
            </div>
            <div>
            	<div class="heading" style="border:groove; border-color:#FF1C21">
	            	Delete Item
                </div>
                <div>
                	<form method="post" id="3">
                    <input type="hidden" name="Delete" value="true" />
                    	<div>
                        	<div>
                            	<label>Item Id: </label>
                            	<input name="ItemId" value="" />
                            </div>
                        </div>
                        <input type="submit" value="Delete Item" />
                    </form>
                </div>
            </div>
            <div>
            	<a href="http://www2.newpaltz.edu/~N02036842/WSP/Website/main.php">Home Page</a>
            </div>
        </div>
    </body>
</html>
